home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
msoftapp.zip
/
TEXTVIEW.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-01
|
2KB
|
98 lines
// textview.cpp : implementation of the CTextView class
//
#include "stdafx.h"
#include "circle.h"
#include "circldoc.h"
#include "textview.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTextView
IMPLEMENT_DYNCREATE(CTextView, CView)
BEGIN_MESSAGE_MAP(CTextView, CView)
//{{AFX_MSG_MAP(CTextView)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTextView construction/destruction
CTextView::CTextView()
{
// TODO: add construction code here
}
CTextView::~CTextView()
{
}
/////////////////////////////////////////////////////////////////////////////
// CTextView drawing
void CTextView::OnDraw(CDC* pDC)
{
CCircleDoc* pDoc = GetDocument();
CCircle circle = pDoc->GetCircle();
circle.TextOut(pDC);
}
/////////////////////////////////////////////////////////////////////////////
// CTextView printing
BOOL CTextView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CTextView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CTextView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CTextView diagnostics
#ifdef _DEBUG
void CTextView::AssertValid() const
{
CView::AssertValid();
}
void CTextView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CCircleDoc* CTextView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCircleDoc)));
return (CCircleDoc*) m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTextView message handlers